<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="telephone=no" name="format-detection" />
    <title>忘记密码</title>
    <link href="{{ static('css/main.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/style.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/shake.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/animate.min.css') }}" rel="stylesheet" type="text/css">
    <link href="{{ static('css/idangerous.swiper.css') }}" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="{{ static('js/jquery-1.8.3.min.js') }}"></script>
    <script type="text/javascript" src="{{ static('js/wo.js') }}"></script>
</head>
<body style="background-color: #fff !important;">
<div class="warpe">
    <div class="head">
        <a href="{{ url('index:password2') }}" class="return"><i class="icon-chevron-left"></i> 返回</a>
        忘记密码
    </div>
    <div class="main">
        <div class="regall">
            <div class="regTxt">
                <p class="color_r">请设置您的新登录密码</p>
            </div>
            <div class="reginput">
                <input type="text" placeholder="请输入旧密码" id="old_password">
            </div>
            <div class="reginput">
                <input type="text" placeholder="请输入6~20位新密码" id="password">
            </div>
            <div class="reginput">
                <input type="text" placeholder="请再次输入" id="password2">
            </div>
            <div class="id_bth inersest_bth animated bounceIn" style="margin-top: 2rem;">
                <a href="{{ url('users:login') }}" id="this">完 成</a>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    $('#this').click(function (e) {
        var old_password = document.getElementById("old_password").value;
        var password = document.getElementById("password").value;
        var password2 = document.getElementById("password2").value;
        $.ajax({
            url: '/password3/',
            data: {
                'old_password': old_password,
                'password': password,
                'password2': password2,
            },
            type: 'POST',
            success: function (data) {
                if (data.errno == '0') {
                    {#window.location.href = "{{ url('users:login') }}";#}

                } else {
                    alert(9999);
                    alert(data.errmsg);
                }
            }
        })
    })
</script>


</body>
</html>
